package com.bbs.util;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * 用户登录验证类
 * 
 * @author Wangpeihu
 * @since 05/01/2010
 * @Team [Never give up]
 */
public class ValidateUtils {

	/**
	 * @验证用户是否已经登录
	 * @param request
	 * @param response
	 * @return
	 */
	public static boolean validate(HttpServletRequest request) {
		HttpSession session = request.getSession();
		Object user = session.getAttribute("user_key");
		if (user != null) {
			return true;
		}
		return false;
	}
}
